#include <map>
#include <set>
#include <vector>
#include <iostream>
#include <utility>
#include <string>
using namespace std;
// 增
void test1()
{
    map<string, double> map1 = {{"hello", 1}, {"world", 2}};
    // cout << map1["hello"] << endl;
    map1.insert({"LinFeng", 2});
    map1.insert(make_pair("first_name", 1));
    map1.insert(pair<string, double>("last_name", 3));
    map1.insert(map<string, double>::value_type("enheng", 4));
    auto map_begin = map1.cbegin();
    while (map_begin != map1.cend())
    {
        cout << map_begin->first << ":" << map_begin->second << endl;
        ++map_begin;
    }
    map1.erase("last_name");
    string a(10, '*');
    cout << a << endl;
    map_begin = map1.cbegin();
    while (map_begin != map1.cend())
    {
        cout << map_begin->first << ":" << map_begin->second << endl;
        ++map_begin;
    }
}
int main()
{
    test1();
}